﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class TaiKhoanBUS
    {
        public static List<TaiKhoanDTO> getAllAccounts()
        {
            return TaiKhoanDAO.getAll();
        }
        public static TaiKhoanDTO getAccountByTen(string tenDangNhap)
        {
            return TaiKhoanDAO.getAccount(tenDangNhap);
        }
        public static TaiKhoanDTO logIn(string tenDangNhap, string matKhau)
        {
            return TaiKhoanDAO.logIn(tenDangNhap, matKhau);
        }
        public static bool isExistAccount(string _username)
        {
            return TaiKhoanDAO.isExistAccount(_username);
        }
        public static bool insertAccount(TaiKhoanDTO tk)
        {
            return TaiKhoanDAO.insertAccount(tk);
        }
        public static bool updateAccount(TaiKhoanDTO tk)
        {
            return TaiKhoanDAO.updateAccount(tk);
        }
        public static bool deleteAccount(TaiKhoanDTO tk)
        {
            return TaiKhoanDAO.deleteAccount(tk);
        }
        public static bool deleteAccount(string _username)
        {
            return TaiKhoanDAO.deleteAccount(_username);
        }
    }
}
